package com.sfy.example.provider;

import com.sfy.core.example.RpcApplication;
import com.sfy.core.example.bootstrap.ProviderBootstrap;
import com.sfy.core.example.config.RegistryConfig;
import com.sfy.core.example.config.RpcConfig;
import com.sfy.core.example.model.ServiceMetaInfo;
import com.sfy.core.example.model.ServiceRegisterInfo;
import com.sfy.core.example.registry.LocalRegistry;
import com.sfy.core.example.registry.Registry;
import com.sfy.core.example.registry.RegistryFactory;
import com.sfy.core.example.service.HttpServer;
import com.sfy.core.example.service.VertxHttpServer;
import com.sfy.core.example.service.tcp.VertxTcpServer;
import com.sfy.example.common.user.UserService;

import java.security.Provider;
import java.util.LinkedList;
import java.util.List;

public class ProviderExample {

    public static void main(String[] args) throws Exception {
        List<ServiceRegisterInfo> serviceMetaInfoList = new LinkedList<>();
        ServiceRegisterInfo serviceRegisterInfo = new ServiceRegisterInfo(UserService.class.getName(),
                UserServiceImpl.class);
        serviceMetaInfoList.add(serviceRegisterInfo);
        // 初始化
        ProviderBootstrap.init(serviceMetaInfoList);
    }
}
